From 549ec911f67484c875a09d4b5b8a9a4fc0ecc806 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 15 Dec 2023 15:31:04 +0000 Subject: Store Patio ints as pointers --- ...shedlang.compiler.testing.snapshots.Snapshotter)].expected | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenLoopTests]/[method:canGenerateCodeForLoop(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected') diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenLoopTests]/[method:canGenerateCodeForLoop(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenLoopTests]/[method:canGenerateCodeForLoop(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 5e62b229..476d643a 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenLoopTests]/[method:canGenerateCodeForLoop(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenLoopTests]/[method:canGenerateCodeForLoop(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -3,6 +3,7 @@ Compilation unit elements: Locals: * (val "int__0" int) + * (val "intPointer__0" data-ptr) Instructions: @@ -10,7 +11,15 @@ Instructions: ( loop ( - (local-store (local "int__0") (int 1)) + (alloc-heap (local "intPointer__0") (struct (int))) + ( + memory-store + pointer=(local "intPointer__0") + layout=(struct (int)) + offset=(0) + value=(int 1) + ) + (data-ptr-to-int (local "int__0") (local "intPointer__0")) ) ) ) -- cgit v1.2.3